Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
lerna | right way to install external package on multiple projects

we are using Lerna to manage our mono-repo projects, and I wish to know the best way to install an external package in my projects and ensure that all of them are using the same version.

my project structure (my-Main-A and my my-Main-B both use my-common):

  • my-Main-A
    • my-common
  • my-Main-B
    • my-common

should I install my external package at the common project and export it from there?

import joi from "joi";

export {joi};

and than import it to the other project:

import {joi} from my-common;

or should I install it on all of the 3 projects?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I faced a similar case and I went with adding the library to all of my packages and used --exact to get the package exact same version

If you want to add a library to a package then exported from there, your shared package should be dependent on all other packages and you have to link it with other packages

# add package "a" to multiple packages
lerna add a --scope=b --scope=c --scope=d  --exact
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda